from flask import Flask
import os
app = Flask(__name__)
app.debug = True

from app.api import api as api_blueprint
from app.admin import admin as admin_blueprint

app.register_blueprint(admin_blueprint)
app.register_blueprint(api_blueprint,url_prefix="/api")

#获取当前文件的入口路径
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))

#设置文件路径
app.config['UP_DIR'] = BASE_DIR+'/app/static/uploads/'